package demoMod.stsconsole.powers;

import demoMod.stsconsole.cards.AbstractCard;
import demoMod.stsconsole.core.AbstractCreature;
import demoMod.stsconsole.interfaces.UseCardSubscriber;

public class AngerPower extends AbstractPower implements UseCardSubscriber {
    public static final String ID = "AngerPower";

    public AngerPower(AbstractCreature owner, int amount) {
        super(ID, owner, amount);
    }

    @Override
    public String getUpdatedDescriptions() {
        return String.format(this.description, this.amount[0]);
    }

    @Override
    public void preUseCard(AbstractCard card) {

    }

    @Override
    public void postUseCard(AbstractCard card) {
        if (card.type == AbstractCard.CardType.SKILL) {
            this.owner.applyPower(this.owner, new StrengthPower(this.owner, this.amount[0]));
        }
    }
}
